<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="fo">
    <xsl:output method="xml" version="1.0" omit-xml-declaration="no" indent="yes"/>

    <xsl:template match="album">
        <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
            <fo:layout-master-set>
                <fo:simple-page-master master-name="simpleA4" page-height="29.7cm" page-width="35cm" margin-top="2cm" margin-bottom="2cm" margin-left="2cm" margin-right="2cm">
                    <fo:region-body/>
                </fo:simple-page-master>
            </fo:layout-master-set>
            <fo:page-sequence master-reference="simpleA4">
                <fo:flow flow-name="xsl-region-body">

                    <fo:block font-weight="bold" font-size="20pt" text-align="center">Your Album</fo:block>

                    <xsl:apply-templates select="image" />

                </fo:flow>
            </fo:page-sequence>
        </fo:root>
    </xsl:template>

    <xsl:template match="image">

        <fo:block font-size="12pt" space-after="3mm" font-weight="bold">
            <xsl:apply-templates select="url" />
        </fo:block>

        <fo:block font-size="12pt" space-after="3mm" font-weight="bold">
            Title:
            <xsl:apply-templates select="title" />
        </fo:block>
        <fo:block font-size="12pt" space-after="3mm" font-weight="bold">
            Cation:
            <xsl:apply-templates select="caption" />
        </fo:block>
        <fo:block font-size="12pt" space-after="3mm" font-weight="bold">
            Taken Date:
            <xsl:apply-templates select="takenDate" />
        </fo:block>

    </xsl:template>

    <xsl:template match="url">
        <fo:external-graphic src="{.}" padding-right="3mm" />
    </xsl:template>
</xsl:stylesheet>